Ext.define('DCApp.view.pay.ListController', {
    extend: 'Ext.app.ViewController',
    alias: 'controller.paylist',

    getSelectedItem: function(){
        return this.getView().getSelectionModel().getSelection()[0] || false;
    },
    onOpen: function() {
    	var sel = this.getSelectedItem();
    	if(!sel)
    		return;
    	this.fireViewEvent('viewpay', this.getView(), sel);
    },

    
    onDblClick: function(view, rec) {
    	this.fireViewEvent('viewpay', this.getView(), rec);
    }
    

});
